package com.qianfeng.yime.fragment;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import com.qianfeng.yime.HotJobActivity;
import com.qianfeng.yime.R;
import com.qianfeng.yime.RecommendJobActivity;

/**
 * Created by Fcy on 2015/3/10.
 */
public class FindFragment extends Fragment implements View.OnClickListener {
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View ret = inflater.inflate(R.layout.fragment_find, container, false);

        ret.findViewById(R.id.find__hot_job).setOnClickListener(this);
        ret.findViewById(R.id.find__recommended_job).setOnClickListener(this);
        ret.findViewById(R.id.find__member_benefits).setOnClickListener(this);

        return ret;
    }

    @Override
    public void onClick(View v) {
        Intent intent = null;
        Context context = getActivity();
        switch (v.getId()) {
            case R.id.find__hot_job: // 热门职业
                intent = new Intent(context, HotJobActivity.class);
                break;
            case R.id.find__recommended_job: // 推荐职业
                intent = new Intent(context, RecommendJobActivity.class);
                break;
            case R.id.find__member_benefits: // 积分
                break;
        }
        startActivity(intent);
    }
}